<!-- Pagination Controls -->
<div class="pagination">
	<span class="page_controls"> 
		{% if resultcount %}
		<span class="page_current page_left">
			Total Records&nbsp;:&nbsp;
			<span class="page_field">{{ resultcount }}</span>
		</span>
		{% endif %}
	
		{% if records.has_previous %} 
			<span class="page_control_on"> 
				<input type="submit" id="submit" name="first"
						title="Jump to the first page." value="first">
				<input type="hidden" id="submit" name="firstpage"
						value="1">
						
				<input type="submit" id="submit" name="previous" 
						title="Jump to the previous page." value="previous" >
				<input type="hidden" id="submit" name="previouspage" 
						value="{{ records.previous_page_number }}" >
			</span>
		{% else %} 
			<span class="page_control_off ui-state-disabled"> 
				<a href="#">first</a>
				<a href="#">previous</a> 
			</span> 
		{% endif %} 
			<span class="page_current">
				Page {{ records.number }} of {{ records.paginator.num_pages }}
			</span> 
		{% if records.has_next %} 
			<span class="page_control_on"> 
				<input type="submit" id="submit" name="next" 
						title="Jump to the next page." value="next" >
				<input type="hidden" id="submit" name="nextpage" 
						value="{{ records.next_page_number }}" >
						
				<input type="submit" id="submit" name="last"
						title="Jump to the last page." value="last">
				<input type="hidden" id="submit" name="lastpage"
						value="{{ records.paginator.num_pages }}">
			</span> 
		{% else %} 
			<span class="page_control_off ui-state-disabled">
				 <a href="#">next</a> 
				 <a href="#">last</a>
			</span> 
		{% endif %} 
		{% if resultcount %}
        {% if currentvirt %}
		<span class="page_current page_right">
			Page Length&nbsp;:&nbsp;
			<input 	type="text" id="pagelength" name="pagelength" 
					maxlength="4" size="4" value="{{resultsperpage}}">
			</input>
		</span>
        {% endif %}
		{% endif %}
		
	</span>
</div>